package com.cloud.cmt.usermanage.dao;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.cmt.usermanage.entity.vo.EnterpriseUserVO;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;


/**
 * 浙江卓锐科技股份有限公司 版权所有 © Copyright 2017<br>
 * 说明: <br>
 * 项目名称: cloud-maintenance <br>
 * 创建日期: 2017年10月24日 14:45 <br>
 * 作者: <a href="6492178@gmail.com">汪萌萌</a>
 */
@ApiModel
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "enterprise_user")
@Entity(name = "enterpriseUser")
public class EnterpriseUserDAO extends EnterpriseUserVO {
    //TODO
    @JsonProperty("enterprise_id")
    @ApiModelProperty(hidden = true)
    private Long enterpriseId;

    @JSONField(name = "serial_number")
    @JsonProperty("serial_number")
    @ApiModelProperty(value = "序列号", example = "BDSW-KJ9O-8UY6-TY2L")
    private String serialNumber;

    @JSONField(name = "account_status")
    @JsonProperty("account_status")
    @ApiModelProperty(value = "账户状态", example = "1", notes = "账户状态(1:待审核,2:审核未通过,4:试用中,5:使用中)")
    private Integer accountStatus;

    @JSONField(name = "account_status")
    @JsonProperty("account_status")
    @ApiModelProperty(value = "启用状态", example = "true")
    private Boolean enable;

    @JSONField(name = "apply_for_time", format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("apply_for_time")
    @ApiModelProperty(value = "申请时间")
    @CreatedDate
    private Date applyForTime;

}
